<template>
	<wd-navbar
		:title="props.title"
		custom-class="head"
		left-text=""
		@click-left="back"
		left-arrow
		fixed
		:safeAreaInsetTop="true"
	>
		<template #right>
			<wd-icon name="picture" @click="handleRightClick" size="22px"></wd-icon>
		</template>
	</wd-navbar>
</template>

<script setup>
const props = defineProps({
	title: {
		default: '7号助手',
		type: String,
	},
})

const toCart = () => {
	uni.switchTab({
		url: '/pages/cart/index',
	})
}

const back = () => {
	uni.navigateBack()
}
const handleRightClick = () => {
	emits('rightClick')
}
const emits = defineEmits(['rightClick'])
</script>
<style scoped lang="scss">
:deep(.head) {
	width: 750rpx;
}
</style>
